package com.jvm123.blog.entity

/**
 *
 * @author yawn http://jvm123.com
 *     2019/10/22 14:45
 */
class PostVo {

    long id
    String postTitle
    String postContent
    String postAuthor
    String postStatus
    Long postDate
    String postType
    int commentCount
    String guid
    String postName
    String thumbnail


//    @Transient
//    Set<Term> categorys
//    @Transient
//    Set<Term> tags

    Post convert() {
        def post = new Post(id: id, postTitle: postTitle,
                postContent: postContent, postName: postName,
                thumbnail: thumbnail, postType: postType)
        post.setPostDate(new Date(postDate))
        post
    }
}
